<template>
  <n-collapse>
    <n-collapse-item title="通用" name="common">
      <div>通用</div>
    </n-collapse-item>
    <n-collapse-item title="视频" name="video">
      <div>视频</div>
    </n-collapse-item>
    <n-collapse-item title="主站" name="index">
      <div>主站</div>
    </n-collapse-item>
    <n-collapse-item title="直播" name="live">
      <div>直播</div>
    </n-collapse-item>
  </n-collapse>
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";
import entries from "../../entries";

const optionLayer = {
  common: {},
  video: {},
  live: {},
  index: {},
};

function optionLayerConstr() {
  for (let mod in entries) {
    const targetMod = entries[mod];
    for (let optionElemName in targetMod.optionUI) {
      const optionElem = targetMod.optionUI[optionElemName];
      optionElem.extendName ??
        (optionElem.extendName = targetMod.name + "_" + optionElemName);
      optionLayer[optionElem.department] = optionElem;
    }
  }
}


export default defineComponent({
  setup() {
    return {
      data: { key: true },
      defaultExpandedKeys: ref(["common"]),
    };
  },
});
</script>
